<?php include TMPL_PATH.'public/header.phtml';?>
<div class="subnav">
    <div class="content-menu ib-a blue line-x">
    	<div style="float:left;margin-right:50px;">
        <a href='javascript:;' class="on"><em>产品列表</em></a><span>|</span>
        <a href='<?php echo U('product/product_designer_info');?>' ><em>添加产品</em></a>
      </div>
      <?php 
      $designer_id = isset($search)&& isset($search['designer_id']) ? $search['designer_id'] : -1;
      $searchkeyword = isset($search)&& $search['keyword'] ? $search['keyword'] : null;
      ?>
    	<div style="color:#000;">
    		<form name="searchform" action="<?php echo U('product/product_designer_list');?>"  method="post">
    		<input type="hidden" value="1" name="search">
    		设计师：<select name="designer_id">
				 	<option value='-1' <?php if($designer_id==-1)echo 'selected';?>>全部</option>
				 	<?php 
				 	
				 	if (isset($designerList) && $designerList):
				 		foreach ($designerList as $key => $val):
				 	?>
				 	<option value='<?php echo $key?>' <?php if($key==$designer_id)echo 'selected';?>><?php echo $val['username'];?></option>
				 	<?php 
				 		endforeach;
				 	endif;
				 	?>
				 </select>&nbsp;&nbsp;&nbsp;作品名称：
				<input type="text" class="input-text" value="<?php echo $searchkeyword;?>" name="keyword">
				<input type="submit" value="搜索" class="button" name="search">
    		</form>
    	</div>
    </div>
</div>
<div class="bk"></div>
<div class="pad_10">
<div class="table-list">
    <table width="100%" cellspacing="0" >
        <thead>
            <tr>
            <th width="30">ID</th>
            <th align='center' width="150">图片</th>
            <th align='center' width="150">设计师</th>
            <th align='left'>作品名称</th>
            <th align='center' width="50">顶/踩</th>
            <th align='center' width="50">显示</th>
            <th align='center' width="150">发布时间</th>
						<th align='center' width="80">管理操作</th>
            </tr>
        </thead>
    <tbody>
    <?php 
   	if(isset($productList) && $productList):
   		foreach ($productList as $v):
   ?>
			<tr>
					<td align='center'><?php echo $v['designer_product_id']?></td>
					
					<td align='center'><img src="<?php echo $v['small_img']?>" /></td>
					<td align='center'><?php echo $v['username']?></td>
					<td><?php echo $v['designer_name']?></td>
					<td align='center'><?php echo $v['product_up'].' / '. $v['product_down']?></td>
					<td align='center'><?php echo $v['display'] ? '<font color="red">√</font>' : '<font color="blue">×</font>';?></td>
					<td align='center'><?php echo date('Y-m-d G:i', $v['start_time']);?></td>
					<td align='center'> 
					<a href="<?php echo U('product/product_designer_info', 'did='.$v['designer_product_id']);?>">修改</a>
					</td>
				</tr>
	<?php 
		endforeach;
		endif;
	?>
   </tbody>
    </table>
	<div id="pages"><?php echo $pageShow;?></div>
</div>
</div>
</body>
</html>
